// 
// Bachelor of Software Engineering
// Media Design School
// Auckland
// New Zealand
//
// (c) 2005 - 2014 Media Design School
//
// File Name	: HighScoreEntry.cpp
// Description	: CHighScoreEntry implementation file.
// Author		: Hayden Asplet.
// Mail			: hayden.asplet@mediadesignschool.com
//

// PCH
#include "SpaceInvadersStd.h"

// Library Includes

// This Include
#include "HighscoreEntry.h"

// Local Includes


CHighScoreEntry::CHighScoreEntry(const std::string& _krstrName, int _iScore)
	:m_strName(_krstrName),
	m_iScore(_iScore)
{

}

bool CHighScoreEntry::operator>(const CHighScoreEntry& _krEntry) const
{
	return m_iScore > _krEntry.GetScore();
}

void CHighScoreEntry::SetName(const std::string& _krstrName)
{
	m_strName = _krstrName;
}

const std::string& CHighScoreEntry::GetName() const
{
	return m_strName;
}

int CHighScoreEntry::GetScore() const
{
	return m_iScore;
}

bool HighscoreCompare(const CHighScoreEntry& _krEntry1, const CHighScoreEntry& _krEntry2)
{
	return _krEntry1 > _krEntry2;
}